Skip to main content
Glama
restart.ts671 B
import { restartMCPCore } from "@/mcp/restart/actions/restartMCP"; import { extractMcpName } from "../../utils"; // Import the utility function export const restartResponse = async (pathname: string) => { // Use extractMcpName to get the mcpName or an error Response const mcpNameResult = extractMcpName(pathname, "restart"); // Handle potential Response error from mcpName extraction if (mcpNameResult instanceof Response) { return mcpNameResult; } // If we got here, mcpNameResult is a string const mcpName = mcpNameResult; const result = await restartMCPCore(mcpName); return new Response(JSON.stringify({ success: true, data: result })); };

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ashwwwin/furi'

If you have feedback or need assistance with the MCP directory API, please join our Discord server